let workData = [
  {
    id: 1,
    title: '测试作品',
    abstract:'测试作品',
    category: {value:1,label:"文字作品"},
    count: 1,
    createdAt: new Date("2020-01-01"),
    creator:{id:1,username:"ganyu"},
    owner:{id:1,username:"ganyu"},
    certificatePath:"https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",
    files: [
      {
        id:1,
        name:"测试文件名称",
        size:40000,
        type:"图片",
        status:1,
        hash:"0xed11048637ab38896010438066585dc795b05e175813a60de6ea9977201a22f2",
        create:{
          id:1,
          txHash:"0xed11048637ab38896010438066585dc795b05e175813a60de6ea9977201a22f2",
          blockTime:1111111111111,
          blockNumber:100000,
          status:1,
        },
      }
    ],
  },
  {
    id: 2,
    title: '测试作品',
    category: '文字作品',
    count: 2,
    createdAt: new Date("2020-02-01"),
    files: [
      {
        id:2,
        name:"测试文件名称",
        size:40000,
        type:"图片",
        status:1,
        hash:"0xed11048637ab38896010438066585dc795b05e175813a60de6ea9977201a22f2",
        create:{
          id:2,
          txHash:"0xed11048637ab38896010438066585dc795b05e175813a60de6ea9977201a22f2",
          blockTime:1111111111111,
          blockNumber:100000,
          status:1,
        },
      },
      {
        id:3,
        name:"测试文件名称",
        size:40000,
        type:"图片",
        status:1,
        hash:"0xed11048637ab38896010438066585dc795b05e175813a60de6ea9977201a22f2",
        create:{
          id:3,
          txHash:"0xed11048637ab38896010438066585dc795b05e175813a60de6ea9977201a22f2",
          blocTime:1111111111111,
          status:1,
        },
      },
    ],
  },
  {
    id: 3,
    title: '测试作品',
    category: '文字作品',
    count: 3,
    createdAt: new Date("2020-03-01"),
    files: [

    ],
  },
]

export default {
  // GET POST 可省略
  'GET /api/work/category': [
    {
      value: '1',
      label: '文字作品',
    },
    {
      value: '2',
      label: '图片作品',
    },
    {
      value: '3',
      label: '视频作品',
    },
  ],
  'GET /api/work': (req,res)=>{
    const { current, pageSize } = req.query;

    res.send({
      "data":     workData,
      "total":    workData.length,
      "success":  true,
      "current":  current,
      "pageSize": pageSize,
    });
  },
  'POST /api/work': (req,res)=>{
    res.send({
      "status":     "ok",
    });
  },
}

